"""Build rules for the final package."""

# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors.
# All rights reserved. The contributor(s) of this file has/have agreed to the
# RapidStream Contributor License Agreement.

load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")

pkg_tar(
    name = "tapa-pkg-tar",
    srcs = [
        "//fpga-runtime:pkg-portable",
        "//tapa:pkg",
        "//tapa-cpp:pkg",
        "//tapa-lib:pkg-portable",
        "//tapa-system-include:pkg",
        "//tapa/cosim:pkg",
        "//tapacc:pkg",
    ],
    allow_duplicates_from_deps = True,
    allow_duplicates_with_different_content = False,
)

# Usage: `bazel run :refresh_compile_commands`
refresh_compile_commands(
    name = "refresh_compile_commands",
    exclude_external_sources = True,  # To exclude llvm-project
)
